import {defineStore} from 'pinia';
import {useStorage} from "@vueuse/core";
const init = {
    //轮播
    carousel: {
        timeShow: {
            show: false,
            name: "时钟",
            weight: 1,
            stayTime: 10,
        },
        kx: {
            show: false,
            name: "快讯",
            weight: 10,
            stayTime: 60,
        },
        marketState: {
            show: false,
            name: "市场状态",
            weight: 2,
            stayTime: 10,
        },
        nft: {
            show: false,
            name: "nft单独展示",
            weight: 0,
            stayTime: 10,
        },
        nftall: {
            show: false,
            name: "nft排行榜1",
            weight: 0,
            stayTime: 10,
        },
        nftall2: {
            show: false,
            name: "nft排行榜2",
            weight: 0,
            stayTime: 10,
        },
        photo: {
            show: false,
            name: "NFT展示",
            weight: 2,
            stayTime: 20,
        },
        photo2: {
            show: false,
            name: "图片新闻",
            weight: 5,
            stayTime: 20,
        },
        pricePicker: {
            show: false,
            name: "关注单币",
            weight: 2,
            stayTime: 10,
        },
        posts: {
            show: false,
            name: "暴躁兔今日",
            weight: 0,
            stayTime: 10,
        },
        twitter: {
            show: false,
            name: "twitter info",
            weight: 10,
            stayTime: 100,
        }
    },
    //nft
    btc: {
        selectData: [
            {
                name: "Bitcoin (BTC)",
                value: "bitcoin"
            },
            {
                name: "Ethereum (ETH)",
                value: "ethereum"
            },
            {
                name:"Tether (USDT))",
                value:"tether"
            },
            {
                name:"EOS (EOS)",
                value:"eos"
            },
            {
                name:"XRPL (XRP)",
                value:"ripple"
            },
            {
                name:"Monero (XMR)",
                value: "monero"
            },
            {
                name:"Litecoin (LTC)",
                value:"litecoin"
            },
            {
                name:"BNB (BNB)",
                value:"bnb"
            },
            {
                name:"USD Coin (USDC)",
                value:"usdcoin"
            },
            {
                name:"Cardano (ADA)",
                value:"cardano"
            },
            {
                name:"Binance USD (BUSD)",
                value:"binance-usd"
            },
            {
                name:"OKB (OKB)",
                value:"okb"
            },
            {
                name:"Polygon (MATIC)",
                value:"matic-network"
            },
            {
                name:"Dogecoin (DOGE)",
                value:"dogecoin"
            },
            {
                name:"Solana (SOL)",
                value:"solana"
            },
            {
                name:"Polkadot (DOT)",
                value:"polkadot"
            },
            {
                name:"Lido Staked Ether (STETH)",
                value:"lido-staked-ether"
            },
            {
                name:"SHIBA INU (SHIB)",
                value:"shiba-inu"
            },
            {
                name:"TRON (TRX)",
                value:"tron"
            },
            {
                name:"Avalanche (AVAX)",
                value:"avalanche"
            },
            {
                name:"Uniswap (UNI)",
                value:"uniswap"
            },
            {
                name:"Dai (DAI)",
                value:"multicollateraldai"
            },
            {
                name:"Wrapped Bitcoin (WBTC)",
                value:"wrapped-bitcoin"
            },
            {
                name:"Cosmos (ATOM)",
                value:"cosmos"
            },
            {
                name:"ChainLink (LINK)",
                value:"chainlink"
            },
            {
                name:"Toncoin (TON)",
                value:"toncoin"
            },
            {
                name:"Ethereum Classic (ETC)",
                value:"ethereum-classic"
            },
            {
                name:"UNUS SED LEO (LEO)",
                value:"leobitfinex"
            },
            {
                name:"Filecoin (FIL)",
                value:"filecoin"
            },
            {
                name:"Bitcoin Cash (BCH)",
                value:"bitcoin-cash"
            },
        ],
        selectValue: {
            name: "Bitcoin (BTC)",
            value: "bitcoin"
        },
    },
    //自动切换黑夜模式
    autoDarkMode: false,
    //黑夜模式
    darkMode: false,
}
export const useSettingStore = defineStore('setting', {
    state: () => ({
        setting:useStorage('setting',  init)
    }),
    actions: {
        reset() {
            this.setting = init;
        }
    }
});

export function getUserStore() {
    return useSettingStore();
}
